home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / bbs / s342q07.lha / mapsys.c < prev    next >
C/C++ Source or Header  |  1993-07-12  |  583b  |  41 lines

  1. /*
  2.  *                mapsys.c
  3.  *
  4.  */
  5.  
  6. /*
  7.  *                history
  8.  *
  9.  * 89Feb02 HAW  Created.
  10.  */
  11.  
  12. #define SYSTEM_DEPENDENT
  13. #include "ctdl.h"
  14. #include "stdarg.h"
  15. /*
  16.  *                Contents
  17.  *
  18.  *    ToFile()        Gets stuff to a file.
  19.  */
  20.  
  21. int putRouteChar(int c);
  22. int (*ToFileWork)(int c) = putRouteChar;
  23.  
  24. /*
  25.  * ToFile()
  26.  *
  27.  * Stuff stuff to a file and append a 0.
  28.  */
  29. void ToFile(char *format, ...)
  30. {
  31.     char garp[MAXTEXT];
  32.     va_list argptr;
  33.     int i;
  34.  
  35.     va_start(argptr, format);
  36.     vsprintf(garp, format, argptr);
  37.     va_end(argptr);
  38.     for (i = 0; garp[i]; i++) (*ToFileWork)(garp[i]);
  39.     (*ToFileWork)(0);
  40. }
  41.